home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- //Borland C++Builder
- //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
- //----------------------------------------------------------------------------
- //---------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
-
- #include "auto1.h"
- //---------------------------------------------------------------------
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent *Owner)
- : TForm(Owner)
- {
- try
- {
- AutoServer = CreateOleObject("BCBAutoSrv.EditServer");
- }
- catch (...)
- {
- ShowMessage("Please build and run the AutoSrv example before this one.");
- Application->Terminate();
- }
- }
- //---------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- AutoServer.OlePropertySet("EditStr", Edit1->Text);
- }
- //---------------------------------------------------------------------
- void __fastcall TForm1::Button2Click(TObject *Sender)
- {
- Edit1->Text = AutoServer.OlePropertyGet("EditStr");
- }
- //---------------------------------------------------------------------
- void __fastcall TForm1::Button3Click(TObject *Sender)
- {
- AutoServer.OleProcedure("Clear");
- }
- //---------------------------------------------------------------------
-